<template>
  <div id="app">
    <Header></Header>
     <!-- 路由组件出口的地方 -->
     <router-view></router-view>
     <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>
<script>
import Header from './components/Header'
import Footer from './components/Footer'
export default ({
  name:'',
  components:{
    Header,
    Footer
  },
  // 组件挂载完毕，向服务器发送的请求
 mounted(){
  // 通过vuex发送请求，获取数据，储存于仓库当中三级列表的数据
  this.$store.dispatch('home/categoryList');
 }
})
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  // padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
